package include;
/**
 * @author admin
 * Car 汽车类
 */
public class Car {
	/**
	 * engine 发动机
	 */
	private Engine engine;
	/**
	 * wheels 轮子
	 */
	private Wheel[]  wheels;
	
	public Car() {
		super();
	}

	public Car(Engine engine, Wheel[] wheels) {
		super();
		this.engine = engine;
		this.wheels = wheels;
	}

	public Engine getEngine() {
		return engine;
	}

	public void setEngine(Engine engine) {
		this.engine = engine;
	}

	public Wheel[] getWheels() {
		return wheels;
	}

	public void setWheels(Wheel[] wheels) {
		this.wheels = wheels;
	}
	
	public void showCarInfo() {
		System.out.println("这辆汽车使用的是:" + engine.getBrand() + "品牌的发动机");
		System.out.println("发动机的型号是:" + engine.getType());
		System.out.println("发动机的排量是:" + engine.getVst());
		System.out.println("轮胎信息：");
		for(Wheel w : wheels) {
			System.out.println("品牌:" + w.getBrand());
			System.out.println("尺寸:" + w.getSize());
		}
	}
}
